import java.util.*;
import javax.sound.midi.MidiUnavailableException;

public class BluesScale extends Scale
{
	public BluesScale(Pitch root)
	{
		scale = new ArrayList<Pitch>();
		
		Pitch probe = root;
		
		scale.add(probe); // P1
		
		probe = new Pitch(probe.freq.next().next().next());
		scale.add(probe); // m3
		
		probe = new Pitch(probe.freq.next().next());
		scale.add(probe); // P4
		
		probe = new Pitch(probe.freq.next());
		scale.add(probe); // TRITONE
		
		probe = new Pitch(probe.freq.next());
		scale.add(probe); // P5
		
		probe = new Pitch(probe.freq.next().next().next());
		scale.add(probe); // m7
		
		probe = new Pitch(probe.freq.next().next());
		scale.add(probe); // P8
	}
		
	public Scale octaveUp()
	{
		return new BluesScale(new Pitch(scale.get(0).freq.octaveUp()));
	}
	
	@Override
	public void arpeggiate(int ms)
	{
		throw new UnsupportedOperationException("Blues scale too FUNKY for arpeggiation!");
	}
	
	public static void main(String[] args) throws SyntaxErrorException, MidiUnavailableException
	{
		Scale funk = new BluesScale(new Pitch("A3"));
		
		int delay = 500;
		funk.play(delay);
	}
}
